package com.qingke.oms.pojo;

public class GoodsOnSale extends Goods{
	private double price;
	public GoodsOnSale(){
		
	}
	public GoodsOnSale(Goods goods){
		this.setId(goods.getId());
		this.setCode(goods.getCode());
		this.setName(goods.getName());
		this.setGoodsType(goods.getGoodsType());
		this.setManufacturer(goods.getManufacturer());
		this.setDescription(goods.getDescription());
	}
	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}
	@Override
	public String toString() {
		String descriptionStr=(getDescription()==null||getDescription().trim().equals(""))?"":(", description=" + getDescription());
		return "Goods [id=" + getId() + ", code=" + getCode() + ", name=" + getName() + ", price=" + price + ", goodsType=" + getGoodsType().getName() + ", manufacturer="
				+ getManufacturer().getName()  + descriptionStr + "]";
	}
	
}
